package net.oschina.app.previousTest;

import android.test.ActivityInstrumentationTestCase2;
import android.view.View;

import com.robotium.solo.Solo;

import net.oschina.app.AppStart;

/**
 * Created by Administrator on 2017/6/30.
 */

public class KeyBoardApiTest extends ActivityInstrumentationTestCase2 {

    private Solo solo;

    public KeyBoardApiTest() {
        super(AppStart.class);
    }

    @Override
    public void setUp() throws Exception {
        super.setUp();
        solo = new Solo(getInstrumentation(), getActivity());
    }

    public void testName() throws Exception {
        solo.sleep(3000);
        //点击 我的
        solo.clickOnText("我的");
        //点击 控件 登录
        solo.clickOnText("点击头像登录");
        //点击 第一个文本框控件
        solo.clickOnEditText(0);
        solo.sleep(4000);
        //隐藏 虚拟键盘
        solo.hideSoftKeyboard();
        solo.sleep(3000);

    }

    @Override
    public void tearDown() throws Exception {
        solo.finishOpenedActivities();
        super.tearDown();
    }
}
